Path 1: 699 calls (0.41)

False (406) True (293)

False (406) True (293)

(0, 1, 0, 1) (564) (1, 1, 1, 1) (135)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 2: 344 calls (0.2)

False (344)

False (344)

(0, 1, 0, 1) (118) (1, 1, 1, 1) (90) (0, 1, 0, 0) (50) (0, 0, 0, 0) (50) (1, 1, 0, 1) (18) (1, 1, 0, 0) (18)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 3: 148 calls (0.09)

True (148)

True (148)

(0, 1, 0, 0) (148)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 4: 131 calls (0.08)

True (131)

True (131)

(0, 1, 0, 0) (131)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 5: 131 calls (0.08)

True (131)

True (131)

(0, 0, 0, 0) (131)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 6: 26 calls (0.02)

True (26)

False (26)

(0, 1, 0, 0) (26)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 7: 26 calls (0.02)

False (26)

True (26)

(0, 1, 0, 0) (26)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 8: 26 calls (0.02)

True (26)

False (26)

(0, 0, 0, 0) (26)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 9: 26 calls (0.02)

False (26)

True (26)

(0, 0, 0, 0) (26)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 10: 26 calls (0.02)

True (26)

True (26)

(0, 0, 0, 0) (26)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 11: 22 calls (0.01)

False (22)

False (22)

(0, 1, 0, 0) (22)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 12: 22 calls (0.01)

False (22)

False (22)

(0, 0, 0, 0) (22)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 13: 21 calls (0.01)

True (21)

True (21)

(0, 1, 0, 0) (21)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 14: 21 calls (0.01)

True (21)

True (21)

(0, 0, 0, 1) (21)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 15: 8 calls (0.0)

True (8)

False (8)

(0, 1, 0, 0) (8)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 16: 8 calls (0.0)

False (8)

False (8)

(0, 1, 0, 0) (8)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 17: 8 calls (0.0)

False (8)

True (8)

(0, 1, 0, 0) (8)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 18: 6 calls (0.0)

True (3) False (3)

False (6)

(1, 1, 0, 1) (6)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 19: 6 calls (0.0)

True (3) False (3)

False (6)

(1, 1, 0, 0) (6)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 20: 3 calls (0.0)

False (3)

True (3)

(1, 1, 1, 1) (3)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 21: 3 calls (0.0)

False (3)

True (3)

(1, 1, 1, 0) (3)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 22: 2 calls (0.0)

True (2)

False (2)

(0, 0, 0, 0) (2)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding
            

Path 23: 2 calls (0.0)

False (2)

True (2)

(1, 0, 0, 0) (2)

1def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]:
2            cached = _padding_cache.get((first_row, last_row))
3            if cached:
4                return cached
5            top, right, bottom, left = padding
6
7            if collapse_padding:
8                if not first_column:
9                    left = max(0, left - right)
10                if not last_row:
11                    bottom = max(0, top - bottom)
12
13            if not pad_edge:
14                if first_column:
15                    left = 0
16                if last_column:
17                    right = 0
18                if first_row:
19                    top = 0
20                if last_row:
21                    bottom = 0
22            _padding = (top, right, bottom, left)
23            _padding_cache[(first_row, last_row)] = _padding
24            return _padding